package com.zhixun.mobile.modules.goods.web;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zhixun.mobile.modules.base.web.BaseController;
import com.zhixun.mobile.modules.goods.service.GoodsService;

/**
 * @author Jakemanse
 * @date 2014-2-26
 * @function <p> </p>
 */
@Controller
@RequestMapping(value = "/goods")
public class GoodsController extends BaseController {
	
	@Autowired
	GoodsService goodsService;

	@RequestMapping(value = {"index",""})
	public String viewEcard(HttpServletRequest request,HttpServletResponse response,Model model) {
		Map<String,Object> params = new HashMap<String, Object>();
		List<Map<String,Object>> goodsList = goodsService.findGoodsList(params);
		model.addAttribute("goodsList", goodsList);
		return "modules/goods/index";
	}
	
}
